﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace ExamSharedClasses
{

    /// <summary>
    /// (k) Der Versuch, alle Gemeinsamkeiten der Commando-Klassen zusammenzufassen
    /// </summary>
    [Serializable()]
    public abstract class Command {

        public string Source { get; set; }

        public Command() : this ("") { }
        public Command(string source) {
            Source = source;
        }

        public override string ToString() {
            StringBuilder sb = new StringBuilder( "Command: " + GetType().ToString() + " ");
            if ( Source != null )
                sb.Append( "Quelle: " + Source.ToString() + '\n' );
            return sb.ToString();
        }

    }
}
